module.exports = app => {
  const mongoose = app.mongoose;
  const Schema = mongoose.Schema;

  const WeixindbSchema = new Schema({
    startTimeStamp: { type: String },
    startTime: { type: String },
    runTime: { type: String },
    recv:{ type: Number },
    send:{ type: Number },
    wxNum: { type: String },
    nick: { type: String },    
    wxid: { type: String, required: true, unique: true },
    expireTime: { type: String },
    isExpire: { type: Number },
    phone: { type: String },
    avatarUrl: { type: String },
    country: { type: String },
    province: { type: String },
    city: { type: String },
    email: { type: String },
    qq: { type: String },
    sign: { type: String },
    pid: { type: String },
    port: { type: String },
    timestamps: { type: String },
    // 自动通过好友请求开关
    isautoPass: { type: Boolean, default: false },
  })

  WeixindbSchema.index({ wxid: 1});

  return mongoose.model('Weixindb', WeixindbSchema);
};
